<html>
<head><meta charset="utf-8"><title>ninja option not respected? · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ninja.20option.20not.20respected.3F.html">ninja option not respected?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="201072203"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ninja%20option%20not%20respected%3F/near/201072203" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Connor Horman <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ninja.20option.20not.20respected.3F.html#201072203">(Jun 16 2020 at 20:50)</a>:</h4>
<p>I'm trying to build rustc, and I set the ninja option to true, however it omits the -GNinja option to llvm's cmake, which causes the build to use makefiles. This also means I can't set my favoured llvm job configuration, which is -j4 with make linker jobs 2 (on my computer, linking llvm in -j4 is a great way to hlt or get OOMed)<br>
Is this known? Is there another option I need to set?</p>



<a name="201086962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ninja%20option%20not%20respected%3F/near/201086962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mati865 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ninja.20option.20not.20respected.3F.html#201086962">(Jun 16 2020 at 23:37)</a>:</h4>
<p>How did you set it? It works just fine for me.</p>
<blockquote>
<p>(on my computer, linking llvm in -j4 is a great way to hlt or get OOMed)</p>
</blockquote>
<p>There is <code>link-jobs</code> in <code>llvm</code> section for that.</p>



<a name="201093799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ninja%20option%20not%20respected%3F/near/201093799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Connor Horman <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ninja.20option.20not.20respected.3F.html#201093799">(Jun 17 2020 at 01:41)</a>:</h4>
<p>I have the line ninja = true in my cargo.toml.<br>
Unfortunately setting <code>link-jobs</code> is useless without the ninja generator being used (make won't care).</p>



<a name="201093805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ninja%20option%20not%20respected%3F/near/201093805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Connor Horman <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ninja.20option.20not.20respected.3F.html#201093805">(Jun 17 2020 at 01:41)</a>:</h4>
<p>*config.toml, not cargo.toml</p>



<a name="201125502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ninja%20option%20not%20respected%3F/near/201125502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mati865 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ninja.20option.20not.20respected.3F.html#201125502">(Jun 17 2020 at 10:47)</a>:</h4>
<p>Maybe you had ninja not enabled the first time you ran the build and CMake cached the generator?<br>
Have you tried clearing llvm build directory? <code>mv build/x86_64-unknown-linux-gnu/llvm build/x86_64-unknown-linux-gnu/llvm1</code></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>